package com.web.action.res;


public class Response {
	private String resultCode = "0";
	private String msg = "";

	public static final Response SUCC = new ReadOnlyResponse("0", "成功");
	public static final Response UserOrPwdInvalid = new ReadOnlyResponse("1","用户名或密码不正确！");
	public static final Response UserOldPwdInvalid = new ReadOnlyResponse("1","原密码不正确");
	public static final Response UserNotExists = new ReadOnlyResponse("2", "用户不存在");
	public static final Response CoopNotExists = new ReadOnlyResponse("201", "机构码错误！");
	public static final Response UserBlacek = new ReadOnlyResponse("202", "禁止登陆！");
	public static final Response SendSmsFail = new ReadOnlyResponse("3", "短信验证码发送失败");
	public static final Response SmsCodeError = new ReadOnlyResponse("4", "短信验证码错误");
	public static final Response TokenInvalid = new ReadOnlyResponse("5","登录超时，请重新登录");
	public static final Response RegFail = new ReadOnlyResponse("6", "注册失败，可能是手机号已经注册过");
	public static final Response OrderNotExists = new ReadOnlyResponse("7", "订单不存在");
	public static final Response OrderDontBelongUser = new ReadOnlyResponse("7", "订单不属于该用户");
	public static final Response UserExists = new ReadOnlyResponse("8", "用户已经存在");
	public static final Response PayTypeNotSupport = new ReadOnlyResponse("9","不支持的支付方式");
	public static final Response CashTypeNotSupport = new ReadOnlyResponse("10","不支持的提现方式");
	public static final Response UserBalanceInsufficient = new ReadOnlyResponse("10","用户余额不足");
	public static final Response CashFail = new ReadOnlyResponse("11", "用户提现操作失败");
	public static final Response SellFail = new ReadOnlyResponse("12", "平仓操作失败");
	public static final Response BuyFail = new ReadOnlyResponse("13", "建仓操作失败");
	public static final Response PwdInvalid = new ReadOnlyResponse("14", "密码无效");
	public static final Response CaptchaError =  new ReadOnlyResponse("15", "验证码错误");
	public static final Response UserNotYours =  new ReadOnlyResponse("16", "不是您的会员");
	public static final Response UserBalanceNotEnough =  new ReadOnlyResponse("16", "用户余额不足");
	public static final Response UserIsLock =  new ReadOnlyResponse("17", "用户已锁定，请联系管理员");
	public static final Response ParamError = new ReadOnlyResponse("999", "参数错误");
	public static final Response Lockd = new ReadOnlyResponse("999", "本期已经已封盘");
	public static final Response Error_Network = new ReadOnlyResponse("500", "网络异常请重试！");
	public static final String SESSION_SECURITY_CODE = "sessionSecCode";
	public static final Response UserNoIsNull = new ReadOnlyResponse("2", "帐号不能为空！");
	public static final Response PasswordIsNull = new ReadOnlyResponse("2", "密码不能为空！");
	public static final Response CodeIsNull = new ReadOnlyResponse("2", "验证码不能为空！");
	public static final Response FFQUCODE = new ReadOnlyResponse("F", "没有当前操作权限！");
	public static final Response EDUCODE = new ReadOnlyResponse("C", "当期充值金额超过可用盘的金额 ！");
	public static final Response ToAgentRoute = new ReadOnlyResponse("2", "请选择代理线路");
	public static final Response ToUserRoute = new ReadOnlyResponse("2", "请选择会员线路");
	public static final Response VIP = new ReadOnlyResponse("6","投注必须要求是会员才可以操作");
	public Response(String code, String msg) {
		this.resultCode = code;
		this.msg = msg;
	}
	
	private static class ReadOnlyResponse extends Response{
		public ReadOnlyResponse(String code, String msg) {
			super(code,msg);
		}
		
		@Override
		public void copy(Response other) {
			throw new RuntimeException("不能调用ReadOnlyResponse.copy方法");
		}
	}

	public Response() {

	}

	public void copy(Response other) {
		resultCode = other.resultCode;
		msg = other.msg;
	}

	public String getResultCode() {
		return resultCode;
	}

	public void setResultCode(String resultCode) {
		this.resultCode = resultCode;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}
}
